package com.eastcom.collection.config

import javax.xml.bind.annotation.XmlTransient;
import org.apache.commons.logging.Log
import org.apache.commons.logging.LogFactory
import javax.xml.bind.annotation.XmlAccessType
import javax.xml.bind.annotation.XmlAccessorType
import javax.xml.bind.annotation.XmlElement
import javax.xml.bind.annotation.XmlRootElement
import javax.xml.bind.annotation.XmlTransient
//<ftpInfo>
//<Type></Type>
//<DataCatalog>DATA.PM.TOP10GAME.ACT_APP</DataCatalog>
//<WorkMode></WorkMode>
//<SystemID>ACT</SystemID>
//<SessionID></SessionID>
//<MsgSerial></MsgSerial>
//<DeliveryTime>20141013152501588</DeliveryTime>
//<ReadyStatusCode></ReadyStatusCode>
//<ReadyStatusDescription></ReadyStatusDescription>
//<ConnectionString>ftp://10.221.232.136:21</ConnectionString>
//<Path>ACT_APP/DATA.PM.TOP10GAME.ACT_APP</Path>
//<userName>DNMS_GET</userName>
//<password>W1n3m5s#</password>
//<FileList>WEB_20141013140000.TXT;PING_20141013140000.TXT</FileList>
//<files>
//	<file>
//		<fileName>WEB_20141013140000.TXT</fileName>
//		<FileFormat>TXT</FileFormat>
//		<CharSet>GBK</CharSet>
//		<IsEncryption>false</IsEncryption>
//		<CipherKey></CipherKey>
//		<CipherFile></CipherFile>
//		<IsCompressed>false</IsCompressed>
//		<CompressKey></CompressKey>
//		<DataInfo></DataInfo>
//		<FieldSeparator>|</FieldSeparator>
//		<LineSeparator></LineSeparator>
//		<XmlSchema></XmlSchema>
//		<FileCheckInfo></FileCheckInfo>
//	</file>
//	<file>
//		<fileName>PING_20141013140000.TXT</fileName>
//		<FileFormat>TXT</FileFormat>
//		<CharSet>GBK</CharSet>
//		<IsEncryption>false</IsEncryption>
//		<CipherKey></CipherKey>
//		<CipherFile></CipherFile>
//		<IsCompressed>false</IsCompressed>
//		<CompressKey></CompressKey>
//		<DataInfo></DataInfo>
//		<FieldSeparator>|</FieldSeparator>
//		<LineSeparator></LineSeparator>
//		<XmlSchema></XmlSchema>
//		<FileCheckInfo></FileCheckInfo>
//	</file>
//</files>
//</ftpInfo>

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name="ftpInfo")
public class FtpTaskConfig implements Serializable{
	String Type
	String DataCatalog
	String WorkMode
	String SystemID
	String SessionID
	String MsgSerial
	String DeliveryTime
	String ReadyStatusCode
	String ConnectionString
	String Path
	String userName
	String password
	String FileList
	Files files
	@XmlTransient
	String localPath
	@XmlTransient
	String taskId
	@XmlTransient
	List<String> fileNameList
	@XmlTransient
	String encode

	@Override
	public String toString() {
		return "FtpTaskConfig [Type=" + Type + ", DataCatalog=" + DataCatalog
				+ ", WorkMode=" + WorkMode + ", SystemID=" + SystemID
				+ ", SessionID=" + SessionID + ", MsgSerial=" + MsgSerial
				+ ", DeliveryTime=" + DeliveryTime + ", ReadyStatusCode="
				+ ReadyStatusCode + ", ConnectionString=" + ConnectionString
				+ ", Path=" + Path + ", userName=" + userName + ", password="
				+ password + ", FileList=" + FileList + ", files=" + files
				+ "]";
	}	
	
}

@XmlAccessorType(XmlAccessType.FIELD)
public class Files implements Serializable{
	List<File> file
}

@XmlAccessorType(XmlAccessType.FIELD)
public class File implements Serializable{
	String fileName
	String FileFormat
	String CharSet
	String IsEncryption
	String CipherKey
	String CipherFile
	String IsCompressed
	String CompressKey
	String DataInfo
	String FieldSeparator
	String LineSeparator
	String XmlSchema
	String FileCheckInfo
}